﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ASoft.Base
{
    public interface IRepository<T>
    {
        void Insert(T entity);

        void Update(T entity);

        void Delete(int id);

        List<T> GetEntities(Dictionary<string, string> condition);

        List<T> GetEntities(Dictionary<string, string> condition, int pageIndex, int pageSize, string[] sortNames, string[] sortTypes);

        PageResult<T> GetPageResult(Dictionary<string, string> condition, int pageIndex, int pageSize, string[] sortNames, string[] sortTypes);

        string DBFileName { get; set; }
    }
}
